package com.sunflower.common.mybatis.aspect.annotation;

import cn.hutool.core.util.ObjectUtil;
import io.github.linpeilie.annotations.AutoMapping;
import lombok.Data;

import java.util.HashMap;
import java.util.Map;

/**
 * TODO
 *
 * @author: SunLuQuan
 * @Date: 2024年04月09日 10:34
 * @Description: DictVo
 */
@Data
public class DictVo implements IDict {

    /**
     * 字典存储值
     */
    @AutoMapping(target = "dict", ignore = true)
    private Map<String, Object> dict;

    @Override
    public Map<String, Object> getDict() {
        if (ObjectUtil.isNull(dict)) {
            this.dict = new HashMap<>();
        }
        return dict;
    }
}
